package edu.uci.ics.ai.maze.utils;

import edu.uci.ics.ai.maze.models.Vertex;

/**
 *
 * @author dpurpura
 */
public final class MazeUtils {

  private MazeUtils() {
  }
  
  /**
   * Returns the straight line distance between start and end.
   *
   * @param start the starting vertex
   * @param end the ending vertex
   * @return the distance between start and end
   */
  public static double euclideanDistance(Vertex start, Vertex end) {
    return Math.sqrt(
        (end.getX() - start.getX()) * (end.getX() - start.getX())
        + (end.getY() - start.getY()) * (end.getY() - start.getY()));
  }

}
